/*
 * Copyright (C) 2008 nextcode:ch
 * 
 * Author: Michele Dell'Ambrogio, m@nextcode.ch
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as 
 * published by the Free Software Foundation.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
package sfplayer.gui;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Locale;
import java.util.ResourceBundle;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author micc
 */
public class PrefPane extends JFrame {

    protected JButton okButton;
    protected JLabel prefsText;
    protected ResourceBundle resbundle;

    public PrefPane() {
        super();
        
        resbundle = ResourceBundle.getBundle("sfplayer/resources/preferences", Locale.getDefault());

        this.getContentPane().setLayout(new BorderLayout(10, 10));
        prefsText = new JLabel(resbundle.getString("text"));
        JPanel textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 10));
        textPanel.add(prefsText);
        this.getContentPane().add(textPanel, BorderLayout.NORTH);

        okButton = new JButton(resbundle.getString("ok"));
        JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 10));
        buttonPanel.add(okButton);
        okButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent newEvent) {
                setVisible(false);
            }
        });
        this.getContentPane().add(buttonPanel, BorderLayout.SOUTH);
        setSize(390, 129);
        setLocation(20, 40);
    }
}
